
sr = 44100
ksmps = 4410
nchnls = 1
0dbfs = 1

; STKTubeBell
; # st drn amp freq fmidx xfade1 xfade2
instr 1
   idur  = p3
   iamp  = p4
   ifrq  = p5
   kindx = p6             ;(FM) Modulator Index One
   ixfade1 = p7
   ixfade2 = p8
   kfad line	ixfade1, idur, ixfade2           ;Crossfade of Outputs

   asig STKTubeBell ifrq, 1, 2, kindx, 4, kfad, 11, 10, 1, 70, 128,50
   asig = iamp * asig
   out asig
endin

; STKWurley
; # st drn amp freq fmidx1 fmidx2 spd(speed of LFO)
instr 2

   ; reasonable gamut and can play short notes

   iamp    = p3
   idur    = p4
   ifrq    = p5
   ifmidx1 = p6
   ifmidx2 = p7
   kspd    = p8

   kndx line ifmidx1, idur, ifmidx2        ;(FM) Modulator Index One
   kenv linseg 0, 0.01, 1, idur-0.03, 0

   asig STKWurley ifrq, 1, 2,kndx, 4, 10, 11, kspd, 1, 30, 128, 75
   asig = iamp * kenv * asig
   out asig
endin

; STKBandedWG
; # st drn amp freq blow_pressure1 blow_pressure2
instr 3
   ; nice floaty ambient thing

   idur  = p3
   iamp  = p4
   ifrq  = p5
   iblow1 = p6
   iblow2 = p7

   kblw line iblow1, idur, iblow2
   kenv line 1, idur, 0

   asig STKBandedWG ifrq, 1, 2, kblw, 4, 100, 11, 0, 1, 0, 64, 100, 128, 120, 16, 2
   asig = iamp * asig * kenv				;envelope
	out asig
endin
